package cc.realxyq.demo.config;

import cc.realxyq.demo.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author kwhan
 * @date 2022年01月09日 18:22
 */
@Configuration
public class BeanConfig {

    @Bean
    public Person person(){
        return  new Person();
    }
    @Bean("myPerson")
    public Person person2(){
        return  new Person("Tom",23);
    }
}
